package com.imut.onlinebanking.user.service.impl;

import com.imut.onlinebanking.user.mapper.LoseMapper;
import com.imut.onlinebanking.user.pojo.entity.Lose;
import com.imut.onlinebanking.user.service.LoseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LoseServiceImpl implements LoseService {

    @Autowired
    private LoseMapper loseMapper;

    @Override
    public List<Lose> getAllLoses() {
        return loseMapper.selectAll(); // ✅ 启用数据库查询
    }

    @Override
    public void insert(Lose lose) {
        System.out.println("insert method called!" + lose);
        loseMapper.insert(lose);
    }


}